from multiprocessing import Process

def foo(i):
    print (f'say hi {i}')

if __name__ == '__main__':
    for i in range(1000):
        p = Process(target=foo, args=(i,))
        p.start()